Skip to content

Add migration assessment formulas and fix LMI configuration defaults#2

Open
pcrai-aws wants to merge 1 commit into
sbbhimji:lmi-scheduled-scaling-region-expansionfrom
pcrai-aws:lmi-migration-skill
Open

Add migration assessment formulas and fix LMI configuration defaults#2
pcrai-aws wants to merge 1 commit into
sbbhimji:lmi-scheduled-scaling-region-expansionfrom
pcrai-aws:lmi-migration-skill

Conversation

@pcrai-aws

Copy link
Copy Markdown

Adds migration-specific assessment guidance and corrects several configuration defaults in the LMI skill based on testing against real Lambda workloads.

Related

PR awslabs#201 (targeting sbbhimji's branch)

Changes

Formulas for deriving LMI configuration from on-demand metrics (SKILL.md Step 1):

  • MaxConcurrency from cpu_total_time and Duration (targeting 50% CPU utilization)
  • MemorySize from per-invoke memory utilization × concurrency
  • MinExecutionEnvironments from baseline concurrent executions
  • Fallback defaults when Lambda Insights is not available
  • Instructions for checking/enabling Lambda Insights

Corrections:

  • Default memory-to-vCPU ratio: 4:1 → 2:1 (matches public docs, CDK defaults, and our testing)
  • Weighted alias traffic shifting: noted as not currently supported for LMI functions
  • Best Practices updated to align with corrected defaults

Testing phase guidance (references/troubleshooting.md):

  • Added "Testing Phase: Monitor and Adjust" section with metric-specific remediation steps for duration regression, CPUThrottles, MemoryThrottles, DiskThrottles, ConcurrencyThrottles, and low CPU utilization

Questions for reviewers:

  • Is there a reason 4:1 was preferred as the starting ratio? Our typical recommendation is 2:1 (the documented default) which we had been thinking works well for most workloads, but curious if there's data suggesting otherwise.

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

  - Add formulas for deriving MaxConcurrency, MemorySize, and
    MinExecutionEnvironments
    from Lambda Insights metrics (cpu_total_time, memory_utilization,
ConcurrentExecutions)
  - Add fallback guidance when Lambda Insights is not available
  - Add Lambda Insights enablement instructions
  - Fix default memory-to-vCPU ratio from 4:1 to 2:1 (matches public
    docs and CDK defaults)
  - Fix weighted alias traffic shifting claim (not currently supported
    for LMI)
  - Add testing phase troubleshooting guidance (CPUThrottles,
    MemoryThrottles,
    DiskThrottles, ConcurrencyThrottles, low CPU utilization)
  - Update Best Practices to align with corrected defaults
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant